<?php
require_once("Config.php");
$sql = "Select * From news where newsType=2";
$result = mysql_query($sql);
if(!$result){
  echo 'Errow account when query the database.';
  exit();
}

while($row = mysql_fetch_array($result)){
  if($row['title']=='menus_intro'){
    $intro = $row['content'];
  }
  if($row['title']=='menus_cocktail'){
    $cocktail = $row['content'];
  }
  if($row['title']=='menus_whisky'){
    $whisky = $row['content'];
  }
  if($row['title']=='menus_food'){
    $food = $row['content'];
  }
  if($row['title']=='menus_lunch'){
    $lunch = $row['content'];
  }
  
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Twilight Cocktail Bar | Beijing</title>
    <script type="text/javascript" src="js/jquery.js">
    </script>
    <script type="text/javascript" src="js/tam.js">
    </script>
    <style type="text/css">

      .twi .pandora .menus-intro {
        width:560px;
        display:block;
        top:145px;
        position:absolute;
        height:50px;
        left:332px;

      }
      .twi .pandora .menus-links {
        display:block;
        position:absolute;
        width:560px;
        height:32px;
        line-height:32px;
        left:332px;
        text-align:left;
        top:255px;

      }
      .twi .pandora .menus-links ul, li {
        margin:0px;
        padding:0px;
        list-style-type:none;
        display:inline-block;
        +
        display:inline;
        text-align:left;
      }
      .twi .pandora .menus-links ul, li a {

        margin-right:3.2em;
        color:#fff;
        text-align:left;
        font-size:13px;
        font-weight:bold;
        /*font-family:"CenturyGothicRegular";*/

      }
      .twi .pandora .menus-links ul, li a:hover {
        color:#C92C24;
      }
      .twi .pandora .menus-links ul, li a:focus {
        outline: none;
      }
      .twi .pandora .menus-content {
        width:560px;
        height:300px;
        display:table-cell;
        position:absolute;
        left:332px;
        bottom:60px;
        line-height:18px;
        vertical-align:bottom;

      }
      .menu_content_data {
        display:none;
      }
      #menus_content_wrapper {
        color:#999;
        font-style:italic;
		
      }
      #menus_content_wrapper dt {
        font-size:13px;
        color:#fff;
        font-weight:bold;
        font-style:normal;
      }
      #menus_content_wrapper span {
        /* font-style:italic;*/
        display:block;
        font-weight:bold;
        font-style:normal;
        color:#8F8672;
        font-style:normal;
      }
      #menus_content_wrapper em {
        margin-left:3em;
        font-weight:bold;
        font-style:normal;
        color:#8F8672;
      }
      #menus_content_wrapper dd label {
        font-style:normal;
        color:#fff;
      }
    </style>
    <link href="css/common.css" rel="stylesheet" type="text/css">
  </head>
  <body class="twi" >
    <!--DATA START (These data should init by PHP)++++++++++++++++++++++++++++++++++++++++++++-->
    <div class="menu_content_data">
      <!--cock tail-->
      <div id="cocktail_content">
       <?php echo $cocktail?>
      </div>
      <!--Whisky-->
      <div id="whisky_content">
        <?php echo $whisky?>
      </div>
      <div id="lunch_content">
       <?php echo $lunch?>
      </div>
      <div id="food_content">
       <?php echo $food?>
      </div>
    </div>
    <!--DATA OVER+++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
    <div class="pandora" id="mainStage">
      <div class="common-page-logo">
      </div>
      <div class="common-page-banner" style="background-image:url(images/menus-banner-bg.jpg)">
      </div>
      <!--MENUS CONTENT START-->
      <div class="menus-intro">

        <?php echo $intro?>

      </div>
      <div class="menus-links">
        <ul>
          <li>
            <a href="#" id="mlink_cocktail" onfocus=this.blur()>Cocktail Menu</a>
          </li>
          <li>
            <a href="#" id="mlink_whisky" onfocus=this.blur()>Whisky Menu</a>
          </li>
          <li>
            <a href="#" id="mlink_food" onfocus=this.blur()>Food Menu</a>
          </li>
          <li>
            <a href="#" id="mlink_lunch" style="margin-right:0px" onfocus=this.blur()>Lunch Menu</a>
          </li>
        </ul>
      </div>
      <div class="menus-content commonStyleofContent">
        <div id="menus_content_wrapper">

        </div>
      </div>
      <!--MENUS CONTENT END-->

      <div class="mainMenu-wrapper">
        <div class="mainMenu">
          <ul>
            <li class="menu_home">
              <a href="index.php"><!--HOME--></a>
            </li>
            <li class="menu_aboutUs">
              <a href="aboutus.php"><!--ABOUT US--></a>
            </li>
            <li class="menu_gallery">
              <a href="gallery.php"><!--GALLERY--></a>
            </li>
            <li class="menu_menus" >
              <a href="#" style="background-position:-354px -18px;"><!--MENUS--></a>
            </li>
            <li class="menu_news">
              <a href="news.php"><!--NEWS--></a>
            </li>
            <li class="menu_events">
              <a href="events.php"><!--EVENTS--></a>
            </li>
            <li class="menu_contact">
              <a href="contact.php"><!--CONTACT--></a>
            </li>
          </ul>
        </div>
      </div>
      <div class="copyright">
        <strong style="color:#666">Twilight Cocktail Bar</strong> @ Beijing &copy 2010  | Mail:<strong>info@twilightcocktailbar.com</strong> | Tel:<strong> +86 10 5900 5376</strong>
      </div>
    </div>
  </body>
  <script type="text/javascript">

    var app={
      _menuLinkStyle:'text-decoration:none; color:#C92C24;',
      _menuLinks:[
      ],
      _resetLinkStyle: function() {
        $('#mlink_whisky').attr('style'," ");
        $('#mlink_cocktail').attr('style'," ");
        $('#mlink_food').attr('style'," ");
        $('#mlink_lunch').attr('style',"margin-right:0px");
      },

      init: function() {
        //default init cocktail
        $('#mlink_cocktail').attr('style',app._menuLinkStyle);
        app.contentWrapper.html($('#cocktail_content').html());

        //get event obj
        $('.menus-links a').bind('click', function(e) {
          if($.browser.msie) {
            o=$(e.srcElement);
          } else {
            o= $(e.target);
          }
          app._resetLinkStyle();
          if(o.attr('id')!='mlink_lunch') {
            o.attr('style',app._menuLinkStyle);
          } else {
            o.attr('style',app._menuLinkStyle+' margin-right:0px');
          }
          switch(o.attr('id')) {
            case 'mlink_whisky':
              app.contentWrapper.html($('#whisky_content').html());
              break;
            case 'mlink_cocktail':
              app.contentWrapper.html($('#cocktail_content').html());
              break;
            case 'mlink_food':
              app.contentWrapper.html($('#food_content').html());
              break;
            case 'mlink_lunch':
              app.contentWrapper.html($('#lunch_content').html());
              break;

          }
          return;
        });

        app.contentWrapper.html($('#cocktail_content').html());
      },

      contentWrapper:$('#menus_content_wrapper')

    }
  </script>
  <script type="text/javascript" src="js/common.js">
  </script>
</html>

